from twisted.web import proxy, http
from twisted.internet import reactor, endpoints

class ProxyFactory(http.HTTPFactory):
    def buildProtocol(self, addr):
    	print addr
        return proxy.Proxy()

endpoint = endpoints.TCP4ServerEndpoint(reactor, 8080)
endpoint.listen(ProxyFactory())
reactor.run()
